home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d22
/
wssi338b.arc
/
CUSTP338.DOC
< prev
next >
Wrap
Text File
|
1988-09-16
|
21KB
|
463 lines
Copyright (C) 1988 by Robert W. Babcock and WSS Division of DDC
All Rights Reserved
CUSTPRNT - WSSINDEX Custom Print Utility Version 3.38
CUSTPRNT reads a WSSINDEX database and prints the contents using
formats not otherwise available. These functions have been put
into a separate program to avoid increasing the size of the
indexing routine. In this release, the print formats available
are multi-column printing, disk labels and disk covers.
This documentation assumes that you are familiar with WSSINDEX.
CUSTPRNT uses much of the same code as WSSINDEX version 3.38, and
uses identical configuration files (even though a few items are
ignored). It also reads a special file of printer control
commands. The DOS environment variables WSSICNF and WSSIDIR are
used, as well as a new variable WSSPRINT. Predefined strings
triggered by Alt-letter are available if defined in the
configuration file, but cannot be changed.
Entry to the main menu is essentially the same as in WSSINDEX.
Two optional command line arguments are allowed to specify the
configuration file name and database file name. If you want to
use the default for the configuration file name, but not for the
database name, specify * as the first argument.
The menu items are:
1-9 - multi-column printing
Similar to the "P" option in WSSINDEX, but the number struck
is the number of columns used for the printed output. The
output page width (from the configuration file) will be
divided into the requested number of columns, separated by
at least two spaces. Comments and categories will go to
separate lines if necessary and so configured.
Note: if the configured print items do not fit in the column
width, they will be truncated, probably in the middle of the
field.
Output may be directed to printer, screen or disk. Screen
output, however, will only be useful if you are configured
to do output with DOS calls (so control-s works) since there
is not a pause when the screen fills.
In order to produce columnar output running down rather than
across the page, an entire page is formatted in core before
printing anything. This leads to a delay of a few seconds
at the start of each page. A hardware or software print
spooler may enable you to drive your printer more
efficiently. You must have enough memory left after loading
the database to hold an entire formatted page (slightly more
than page width times page length bytes).
You can include a printer initialization command in the
printer definition file which will be sent to your printer
before multi-column output is started.
B - list files which are not Backed up
Same as the "B" option of WSSINDEX except that you will be
prompted for the number of print columns.
C - disk Covers
A disk cover is a listing of all the files on a single disk,
small enough to fit into a disk envelope or be pasted on the
front of the envelope. (You could even define a small cover
format and print it on a label as an alternative to the "L"
option format labels.) The edges are marked by a box to
make cutting to size easy. You can select which disks to
print covers for by volume name (with wildcards) or by date
indexed. The output format is similar to the multi-column
output described above, plus a header with information about
the disk. You will be prompted for the desired number of
print columns.
The fields printed are selected by the usual configuration
menu. The disk name and subdirectory names are printed
separately, so you should not include them in the configured
print fields. If you use the printer definition in the
supplied file WSSPRINT.DEF, you can fit file size, date and
time in 2 columns, date or size in 3 columns, or file names
only in 4 or 5 columns. In a single column, you could even
fit comments of moderate length. If you change the paper
width in the WSSPRINT.DEF file, you can direct the output to
the screen when experimenting to see how much information
will fit. To avoid the necessity of changing the
configuration by hand (and the probability of forgetting)
whenever you print covers, you will almost certainly want to
have a special configuration file to control the printing of
disk covers.
Note: as with multi-column output, if the configured print
items do not fit in the column width, they will be
truncated, probably in the middle of the field.
If you want to print disk covers for any disks with
subdirectories, and these disks were added to your database
by a version of WSSINDEX older than 3.2, then you should run
the IDADD utility on your database first. If you do not do
this, the disk cover will not include subdirectory names.
D - Display statistics
Exactly the same as the WSSINDEX "D" option.
G - Get a database from disk
Exactly the same as the WSSINDEX "G" option.
L - disk Labels
Disk labels are meant to be printed on small, self adhesive
forms and pasted on your disks. Suitable forms are
generally 1 by 3 inches or smaller, so there is only room
for a limited amount of information. This program prints
the disk volume id, total and free space, date indexed,
number of files (and subdirectories, if any), descriptive
comments for the disk and subdirectories (if found in
database), and directory info for as many files as will fit,
starting from the largest. You can also specify one line of
text in the printer definition file, such as your name,
which will be printed at the bottom of every label. You can
select which disks to print labels for by a wildcard name or
by date indexed.
Blank label forms which are one or several labels wide may
be used. You can also direct output to the screen or a disk
file. See section below for information on printer
definition.
O - change cOnfiguration info
Exactly the same as the WSSINDEX "O" option.
Q - Quit and return to DOS
Same as the WSSINDEX "Q" option except that there is no
possibility that the in-core database has been changed, so
the default answer to the "Do you want to quit" question is
always yes.
^Q - Quick Quit
Immediate return to DOS without verification.
R - Read a printer definition file
Normally, this file is read automatically the first time you
select a print operation, so this option is only needed if
you want to use two different configurations in the same
session, or if you have used the S option to run an editor
to change the definition file. The default name of the
printer definition file is the first of
1. The last printer definition file read
2. The DOS environment variable WSSPRINT (DOS command
set WSSPRINT=filespec)
3. WSSPRINT.DEF
which is defined.
S - push to DOS
Exactly the same as the WSSINDEX "S" option. One possible
use would be to run a text editor to change a printer
definition file.
V - list Volume names
Exactly the same as the WSSINDEX "V" option.
^V - quick list of Volume names
Like the WSSINDEX quick list, except that the volume names
are sorted backward by date indexed so you can see which
disks have been recently added and may need new labels or
covers.
X - toggle eXpert mode
Exactly the same as the WSSINDEX "X" option.
Printer Definition File
To run effectively, CUSTPRNT needs to be able to set the print
pitch and line spacing on your printer, especially when printing
disk covers or labels which require small print. Unfortunately,
there is no standard way to do this; all printers are different.
So, CUSTPRNT must be told how to control your printer. You
supply this information in a printer definition file. (I'd call
it a configuration file, but that leads to confusion with the
WSSINDEX configuration file.) The name of the printer definition
file is set by the environment variable WSSPRINT, analogous to
WSSICNF and WSSIDIR. If not specified, the default name is
WSSPRINT.DEF. The file is read the first time a print operation
is requested, or when you select "R" from the main menu.
Included in the standard distribution package is a definition
file WSSPRINT.DEF for Epson compatible dot matrix printers. If
this isn't adequate for your printer, you will need to look up
control codes in your printer manual and modify this file. I
realize that it would be better if I supplied definition files
for hundreds of different printers, but I don't have the
resources to create and test them, and the Epson standard is
widely recognized. Registered users who have problems
configuring should send me a photocopy of the appropriate pages
from their printer manual (usually the control codes are
summarized in a few pages) and I will try to assist. Of course,
it may be that your printer does not accept any commands, in
which case you must make any necessary selections manually.
The format of the definition files is designed for easy editing
with a word processing program. The file begins with as many
lines of comments as desired, until a line beginning with ---- is
encountered. After this, alternate lines are comments and
parameters. The comment lines are ignored when the file is read,
but since they tell you what the parameters mean, the only
changes you should make are to add more detail. Printer control
sequences and other items (except for the printer name) are
strings of decimal numbers, separated by commas or spaces.
If your printer manual doesn't list decimal codes, there is a
conversion table at the end ofthis document. Printer command
strings can be omitted, but other parameters should have a value
filled in.
Margins, width and length specifications in this file override
those found in WSSINDEX.CNF when printing labels or covers.
The defineable items are:
Printer name - echoed to the screen during initialization, but
otherwise not used.
Three sets of printer initialization commands - 50 chars max. The
first set is used for multi-column printing, the second for
disk labels, and the third for disk covers. Typically this
would include commands to select the number of characters
per inch printed and line spacing. You may also be able to
get very small characters by selecting subscript or
superscript mode, although some printers (like mine) are
slow in this mode and do not print characters with
descenders very well. You can also include any other
necessary initialization commands here, such as bold
printing or form length.
Printer deinitialization command - 10 chars max. This command
string is sent to the printer after a print task is
completed. It could include a form feed to eject the last
page from a laser printer, or could reset default printer
options.
Left margin for labels - number of print positions to leave blank
before printing the first column of labels.
Number of columns for labels - the number of blank labels across
a row of your forms.
Width of labels - The number of characters which will fit across
a label (starting from the left margin). This effectively
defines the right margin.
Number of characters between labels - for multi-column forms,
this is the number of characters between the right margin of
one label and the left margin of the next.
Length of label in lines - label size, including top and bottom
margin lines which you don't want to print on.
Number of usable lines for label - maximum number of lines to
print on a label.
Left margin for disk covers- number of print positions to leave
blank before printing left side of box which surrounds disk
covers.
Width of paper for disk covers - number of characters which will
fit in 5.25 inches (or 3.5 or whatever disk size you use).
Length of page in lines for disk covers - number of lines which
will fit in 5.25 inches (or 3.75 inches for paste-on size).
Position for the next disk cover - 10 characters max. Printer
command to position the paper for the next disk cover. This
could be a form feed, or a number of line feeds. A 0 here
is interpreted to mean manual positioning, with a pause at
the end of each cover.
Character to use for sides of disk cover box - disk cover
listings have a border drawn around them. The sides of this
border could be a vertical stroke, or your printer may have
a better graphics character available. If no suitable
character is available, or for faster printing, just use a
blank (32).
Character to use for top and bottom lines - probably a hyphen or
a graphics character.
Character to use for top left corner - If your printer has box
forming characters in its graphics character set, use them
for the corner characters, otherwise you can use the same
character as the top or sides, or a blank, or a plus,
whichever you think looks best.
Character to use for top right corner
Character to use for bottom left corner
Character to use for bottom right corner
End of printer definition file
----------
Additional items may be added to this file in future releases if
users report that there are printers which cannot be adequately
defined. If you create a definition file for a different
printer, especially a laser printer, I would appreciate receiving
a listing so that I will have it when the inevitable cries for
help come in from other users.
CUSTPRNT is part of the WSSINDEX package. Please see the
WSSINDEX DOC file file for details on registering your software.
Registered users are encouraged to suggest the custom print
formats which they would like to see added to CUSTPRNT.
Robert W. Babcock
WSS Division of DDC
4 Reeves Road
Bedford, MA 01730
USA
617-275-1183
Character Code Conversion Table
ascii decimal hex ascii decimal hex ascii decimal hex
NUL 0 0 0 48 30 ` 96 60
SOH 1 1 1 49 31 a 97 61
STX 2 2 2 50 32 b 98 62
ETX 3 3 3 51 33 c 99 63
EOT 4 4 4 52 34 d 100 64
ENQ 5 5 5 53 35 e 101 65
ACK 6 6 6 54 36 f 102 66
BEL 7 7 7 55 37 g 103 67
BS 8 8 8 56 38 h 104 68
TAB 9 9 9 57 39 i 105 69
LF 10 A : 58 3A j 106 6A
VT 11 B ; 59 3B k 107 6B
FF 12 C < 60 3C l 108 6C
CR 13 D = 61 3D m 109 6D
SO 14 E > 62 3E n 110 6E
SI 15 F ? 63 3F o 111 6F
DLE 16 10 @ 64 40 p 112 70
DC1 17 11 A 65 41 q 113 71
DC2 18 12 B 66 42 r 114 72
DC3 19 13 C 67 43 s 115 73
DC4 20 14 D 68 44 t 116 74
NAK 21 15 E 69 45 u 117 75
SYN 22 16 F 70 46 v 118 76
ETB 23 17 G 71 47 w 119 77
CAN 24 18 H 72 48 x 120 78
EM 25 19 I 73 49 y 121 79
SUB 26 1A J 74 4A z 122 7A
ESC 27 1B K 75 4B { 123 7B
FS 28 1C L 76 4C | 124 7C
GS 29 1D M 77 4D } 125 7D
RS 30 1E N 78 4E ~ 126 7E
US 31 1F O 79 4F DEL 127 7F
32 20 P 80 50
! 33 21 Q 81 51
" 34 22 R 82 52
# 35 23 S 83 53
$ 36 24 T 84 54
% 37 25 U 85 55
& 38 26 V 86 56
' 39 27 W 87 57
( 40 28 X 88 58
) 41 29 Y 89 59
* 42 2A Z 90 5A
+ 43 2B [ 91 5B
, 44 2C / 92 5C
- 45 2D ] 93 5D
. 46 2E ^ 94 5E
/ 47 2F _ 95 5F
Three letter combinations are non-printing control characters.